{{if $CurrentUser['id']}}
		<div class="ui-portlet">
			{{template wxes/_user_wxes}}
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;{{__('Personal Center')}}</a></li>
			  <li class="active">图文素材列表</li>
			</ol>
		</div>        
       <hr>
       <div class="mb10">
       		<a class="btn btn-primary" href="http://www.135editor.com/">新增图文素材</a>
       		<a class="btn btn-primary" href="{{$this->Html->url('/user_cates/mine?model=WxMsg')}}">素材分类管理</a>
       </div>
       <br/>
<ul class="nav nav-tabs">
  <li role="presentation" {{if empty($_REQUEST['deleted'])}} class="active" {{/if}}><a href="/wx_msgs/mine"><i class="fa fa-list"></i> 素材列表</a></li>
  <li role="presentation" {{if $_REQUEST['deleted']}} class="active" {{/if}}><a href="/wx_msgs/mine?deleted=1"><i class="fa fa-trash"></i> 回收站</a></li>
</ul>
       
       <div class=" ui-portlet" id="wxmsg-mine-list">
       
       
       
       {{if empty($_REQUEST['deleted']) }}
       <div style="margin-bottom:5px;">
       	{{if $is_mobile}}
       		<a href="/wx_msgs/syncToWechat" id="syncToWechat" data-toggle="tooltip" title="将文章同步至微信素材" class="btn btn-primary btn-sm">多图文同步</a>  
       	{{else}}
			<a href="#" id="syncToWechat" data-toggle="tooltip" title="将文章同步至微信素材" class="btn btn-primary btn-sm">多图文同步</a>       	
		{{/if}}
			<a href="/wx_timing_broads/mine" target="_blank" class="btn btn-warning btn-sm">微信定时群发</a>
			<a href="/signatures/mine" target="_blank" class="btn btn-warning btn-sm">签名设置</a>
		</div>
		<!-- <div class="clearfix" style="border-bottom: 1px solid #ddd;">
				<label for="wxmsg-mine-wxid">当前公众号</label>
				<?PHP $user_wx_lists['all'] = '全部';  ?>
				{{$this->Form->input('wx_id',array('id'=>'wxmsg-mine-wxid','options'=>$user_wx_lists,'style'=>'width:auto;','value'=> !$_REQUEST['manage_wxid']? 'all' : $current_wxinfo['Wx']['id'], 'div'=>false,'label'=>false))}}
				
		</div> -->
		<div>
			所属分类： {{$this->Form->input('cate_id',array('id'=>'wxmsg-mine-cateid','options'=>$cates,'style'=>'width:auto;','value'=> $_REQUEST['cate_id'] , 'div'=>false,'label'=>false))}}
		</div>
		
		{{/if}}
		<div class="clearfix form-inline" style="border-bottom: 1px solid #ddd;padding:5px 0;">
		<p><input type="text" class="form-control" style="width:200px;" placeholder="输入词按标题搜索文章" value="{{$_GET['name']}}" id="SearchWxMsgName"> <button onclick="return $('#tab-wxmsg-trigger').trigger('click');" class="btn btn-primary" ><i class="fa fa-search"></i> 搜索</button></p>
		</div>
		
       	{{$page_navi}}
	       <div class="row">
	       {{loop $datalist $k $item}}
	       	<div class="col-md-4">
	       		<div class="appmsg article-msg clearfix" id="wx-msg-{{$item['WxMsg']['id']}}"  data-creator="{{$item['WxMsg']['creator']}}"  data-id="{{$item['WxMsg']['id']}}">
		       		<div class="appmsg_content">
		       			{{if $item['WxMsg']['coverimg']}}
			       			{{$this->Html->image($item['WxMsg']['coverimg'],array('class'=>'cover'))}}
			       		{{/if}}
			       		<p class="title">
			       			{{htmlspecialchars($item['WxMsg']['name'])}}&nbsp;&nbsp;<a href="{{Configure::read('WxMsg.view_domain')}}/wx_msgs/spview/{{$item['WxMsg']['creator']}}/{{$item['WxMsg']['id']}}?width=400&expire={{urlencode($expire)}}{{if $c}}&c={{$c}}{{/if}}" data-toggle="tooltip" data-container="body" title="预览" target="_blank">[{{__('Preview')}}]</a>
			       		</p>
			       		<p style="font-weight:normal;font-size: 12px;">{{$item['WxMsg']['updated']}}</p>
			       		<p>{{$item['WxMsg']['word_event']}}</p>
			       		<p class="appmsg_desc summary">{{usubstr(htmlspecialchars($item['WxMsg']['summary']),0,32)}}</p>
		       		</div>
		       		<div class="appmsg_opr clearfix">
		       			
		       			{{if $item['WxMsg']['deleted']}}
		       				{{$this->Html->link('<i data-toggle="tooltip" target="_blank" data-container="body" data-placement="top" title="恢复" class="fa fa-undo"></i>', array('controller'=>'wx_msgs','action' => 'restore', $item['WxMsg']['id']),array('class'=>'col-xs-4 opr-restore','onclick'=>'return ajaxAction(this.href,null,null,function(request){if(request.success || request.ret == 0){$(\'#wx-msg-'.$item['WxMsg']['id'].'\').remove();} });','data-id'=>$item['WxMsg']['id'],'escape'=>false))}}
		       				<a tabindex="0"  role="button" data-trigger="focus" href="javascript:void(0)" data-url="{{$this->Html->url('/wx_msgs/delete/'.$item['WxMsg']['id'])}}" class="col-xs-4 delete-pop" data-content="确定永久删除此素材？"><i title="{{__('Delete')}}" class="fa fa-remove"></i></a>
		       			{{else}}
		       				{{$this->Html->link('<i data-toggle="tooltip" target="_blank" data-container="body" data-placement="top" title="'.__('Edit').'" class="fa fa-edit"></i>', 'javascript:void(0)',array('class'=>'col-xs-4 opr-edit','data-id'=>$item['WxMsg']['id'],'data-creator'=>$item['WxMsg']['creator'],'escape'=>false))}}
		       				<a tabindex="0"  role="button" data-trigger="focus" href="javascript:void(0)" data-url="{{$this->Html->url('/wx_msgs/trash/'.$item['WxMsg']['id'])}}" class="col-xs-4 delete-pop" data-content="确定删除此素材？删除后将转移至回收站，30天后自动删除。"><i title="{{__('Trash')}}" class="fa fa-trash showtooltip"></i></a>
		       			{{/if}}
		       			{{$this->Html->link('<i title="历史版本" class="fa fa-list showtooltip"></i>', array('controller'=>'version_controls','action' => 'lists', 'WxMsg',$item['WxMsg']['id'],$item['WxMsg']['creator']),array('class'=>'col-xs-4','target'=>'_blank','data-id'=>$item['WxMsg']['id'],'escape'=>false))}}
		       			
		       		</div>
	       		</div>
	       	</div>
	       	
	       	{{if $k%3 == 2}} <div class="clearfix"></div> {{/if}}
	       	
	       	
	  		{{/loop}}
	    	</div>
    	{{$page_navi}}
    	
    	</div>
{{else}}
<div class="container">
 	<div class=" ui-portlet" id="wxmsg-mine-list">	您还没有登录，请<a href="/users/login" onclick="return checkLogin();">登录</a>后查看。</div>
</div>
{{/if}}
    	
